package creationPattern.Factory.Factory_02.controller;

import creationPattern.Factory.Factory_02.entity.AwardInfo;
import creationPattern.Factory.Factory_02.entity.ResponseResult;
import creationPattern.Factory.Factory_02.factory.FreeGoodsFactory;
import creationPattern.Factory.Factory_02.service.IFreeGoods;

public class Controller {

    public ResponseResult awardToUser(AwardInfo awardInfo){
        IFreeGoods service = FreeGoodsFactory.getServiceInstance(awardInfo.getAwardType());
        return service.sendFreeGoods(awardInfo);
    }
}
